package com.ctshk.rpc.order.custom.service;

import com.ctshk.common.dto.Result;
import com.ctshk.common.model.TokenUser;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderDetailDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderListDTO;
import com.ctshk.rpc.order.custom.dto.order.CustomOrderUpdateContactDTO;
import com.ctshk.rpc.order.custom.dto.order.MyCustomizedOrderDTO;
import com.ctshk.rpc.order.custom.req.order.CustomOrderIdReq;
import com.ctshk.rpc.order.custom.req.order.CustomOrderListReq;
import com.ctshk.rpc.order.custom.req.order.CustomOrderUpdateContactReq;
import com.ctshk.rpc.order.custom.req.schedule.TripScheduleCreateOrderReq;

import java.time.LocalDateTime;
import java.util.List;

/**
 * <p>
 * 定制包团订单 服务类
 * </p>
 *
 * @author 叶冠峰
 * @since 2021-02-22
 */
public interface ICustomizedOrderService {

    /**
     * 定制包团下单
     * @param req
     * @param userId
     * @return
     */
    Result createOrder(TripScheduleCreateOrderReq req, Long userId);

    /**
     * 订单列表
     * @param req
     * @param currentUser
     * @return
     */
    Result<CustomOrderListDTO> list(CustomOrderListReq req, TokenUser currentUser);

    /**
     * 取消订单
     * @param req
     * @return
     */
    Result cancel(CustomOrderIdReq req);

    /**
     * 订单详情
     * @param req
     * @return
     */
    Result<CustomOrderDetailDTO> detail(CustomOrderIdReq req);

    /**
     * 操作订单-修改联络人信息
     * @param req
     * @return
     */
    Result<CustomOrderUpdateContactDTO> updateContact(CustomOrderUpdateContactReq req);

    /**
     * 最近一次查询结束时间到当前时间的数据
     */
    Result<List<MyCustomizedOrderDTO>> recentToNow(LocalDateTime recent, LocalDateTime now);
}
